class Car:
    def __init__(self, model, price):
        self.model = model
        self.price = price

    def othermethod(self):
        pass #其他方法

    # @classmethod
    # def average_price(cls, cars):
    #     return sum(_.price for _ in cars) / len(cars)


def average_price(cars):
    return sum(_.price for _ in cars) / len(cars)

# 示例使用
# 创建对象列表
lux_cars = [
    Car("Audi", 350000),
    Car("Benz", 480000),
    Car("BMW", 420000)
 ]

# 计算平均价格
#print(f"The average price is: {int(Car.average_price(lux_cars))}")
print(f"The average price is: {int(average_price(lux_cars))}")